home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-14 | 68.8 KB | 1,898 lines |
- Scientific Endeavors Corporation
- 508 N. Kentucky St.
- Kingston, TN 37763
- Sales: (800) 998-1571
- Tech Support: (615) 376-4146
- Fax: (615) 376-1571
-
-
- The GraphiC demo package contains both a DOS-based demo program and a
- Windows-based demo program. Copy all files on all disks into a directory
- on your hard disk.
-
- DOS DEMO
-
- Before running DEMO.EXE, you must run the program EQUIP. It asks questions
- about your equipment and makes a file called config.gpc for your monitor
- and a file called printer1.prn for your printer. The main program will use
- these files to adapt itself to your hardware. After running EQUIP, run
- DEMO.EXE to start the demo.
-
- Windows DEMO
-
- Choose Run from the Windows File menu and run GPCWDEMO.EXE to start the demo.
-
- GraphiC Features
-
- The demo provides a sample of some of the kinds of things that GraphiC can
- do. GraphiC produces publication-quality graphs and charts in monochrome,
- or in color on multi-pen plotters, color monitors and some printers. It
- includes the following features:
-
- GraphiC has the capability of generating several types of plots:
-
-
- linear x-y plots log-log plots
- contour plots 3-D curves
- 3-D surfaces 3-D bars
- polar plots bar charts
- pie charts Smith charts
-
- 1. Linear and log plots
-
- All linear and log plots are self-scaling, but you may also specify
- your own scales.
-
- Linear plots and semi-log plots may have the linear axes positioned
- at zero or at the left edge of the x-axis.
-
- An additional y-axis, with a different scale may be positioned at
- the right end of the x-axis.
-
- Y-axis labels may be oriented either horizontally or vertically.
-
- Logarithmic axes need not start or end on even decade values.
-
- A windowing feature allows for cropping of a plot on a specified rectangular
- boundary. A second plot may be drawn in this region. Scaling and positioning
- of this second plot are automatic.
-
- Log plots can be produced with any specified base.
-
- 2. Curves
-
- Curves may be drawn in any of nine line types and in any of 216 different
- colors.
-
- Thickening of any line may be specified. Ends of contiguous segments
- are squared, and intermediate intersections are mitered.
-
- Markers may be placed every N datum points. Sixteen symbol types are
- provided.
-
- Data may be represented by the points alone.
-
- X and/or Y error bars may be inserted.
-
- A legend-box facility is provided for the style choices. The line
- styles for the curves are automatically chosen from the sequence of
- styles in the legend box.
-
- 3. Vectors
-
- Vectors may be drawn with several head styles on either or both ends.
-
- Provision is made for the plotting of vector fields.
-
- 4. Smoothing
-
- Facilities are included for cubic spline smoothing of either two dimensional
- or three dimensional plots.
-
- An additional smoothing method using piecewise linear regression is
- provided for scattered data points.
-
- 5. Panel filling
-
- Fast panel filling is provided for figures with any number of sides
- up to the limit of computer memory. Filling may be done with 16
- geometric patterns, 16 gray shades or 216 colors. On devices that do
- not support 256 colors GraphiC will use dither patterns.
-
- 6. Contour plots
-
- Contour plots may have every nth curve labeled.
-
- The line style and color may be specified for each level.
-
- The regions between contour levels can be filled with any of GraphiC's
- panel filling patterns.
-
- Polar contour plots may be created.
-
- 7. 3-D Surfaces
-
- 3-D surfaces have optional hidden line removal.
-
- Either or both top and bottom sides may be shown.
-
- The two sides may be drawn in different colors.
-
- Mesh cells may be color coded according to the value of the height
- variable and they may be filled with any of the usual pattern choices,
- also coded according to height.
-
- 2-D plots may be superimposed on a 3-D plot. They may be positioned
- anywhere in the x-y, x-z, or y,z planes. With this facility, a contour
- plot can be displayed along with the corresponding 3-D surface, or
- individual contours may be positioned on the 3-D surface at the proper
- height.
-
- Vertical bars may be drawn in place of the wire-mesh pattern.
-
- Both contour plots and 3-D surfaces may be made from data scattered randomly
- in the x-y plane. An interpolation algorithm along with cubic spline smoothing
- is used to get values on a regularly spaced grid.
-
- 8. Polar plots
-
- Polar plots have user-specified circular grid lines with string labels.
- Labels are positioned below the zero radial line.
-
- Radial lines are at user controlled degree intervals.
-
- 9. Bar charts
-
- Bar charts may have stacked bars or the bars may be displaced horizontally,
- with the second of a pair of bars partially hidden by the first.
-
- Bars may be filled with a set of special patterns or the standard
- fill patterns and colors.
-
- String labels may be used.
-
- 10. Pie charts
-
- Pie charts have automatically positioned legends.
-
- Individual slices may be filled with the standard selection of colors
- and patterns, and they may be pulled out radially.
-
- 11. Smith charts
-
- The Smith chart is highly detailed. Provision is made for plotting
- impedance points and reflection coefficients and for drawing lines
- at a constant reflection coefficient.
-
- 12. Wedge plots
-
- Wedge plots can be created.
-
- 13. Fonts
-
- A selection of high-resolution, proportionally spaced fonts is provided
- including a large number of filled fonts.
-
- As many as four fonts can be active at any time and they can be intermixed
- as desired.
-
- You may control the height, character-spacing and line-spacing.
-
- Unlimited levels of super- and subscripts are supported, with a user-
- adjustable size reduction and shift ratio.
-
- Plots containing only text are easily made.
-
- Letters may be widened, skewed, emboldened or colored.
-
- The filled letter fonts can be drawn with the filling option turned
- off to provide outline fonts.
-
- 14. Cross hairs
-
- Cross hairs may be displayed and positioned with a mouse or the arrow
- keys. We support both the Logitech and Microsoft mice.
-
- The current position is printed at the left edge of the screen either
- in pixels or the units of your plot.
-
- Values at selected points may be saved in global arrays.
-
- The cursor may be used to draw or erase lines on the screen.
-
- The cross hairs also are used with the zoom feature (See below).
-
- 15. Output files
-
- Output is written to a disk file in Tektronix .TKF format. It also
- may be viewed on the screen as it is being generated. The stored
- resolution is 4096 X 3120.
-
- In "large mode" you can interact directly with the stored file to
- zoom, print or plot it.
-
- A facility called PLAY.EXE allows replay of a .TKF file at any later
- time for zooming, printing and plotting.
-
- An insert mode allows a previously stored plot to be inserted in
- a window of another plot.
-
- The zoom mode uses the cursor to select a region of the picture to
- be enlarged. In a second mode, the cursor specifes a region into which
- the picture is to be compressed.
-
- PostScript, Digital Research .GEM, HPGL, and Lotus .PIC files can be
- created.
-
- 16. Printers and plotters
-
- A large selection of printers and plotters is supported, including
- several printers with multi-colored ribbons, the HP and Cannon laser
- printers the HP ThinkJet and the HP PaintJet. Several plotters types
- are supported including the HPGL series.
-
- For most printers, two resolutions are provided: a coarse plot for
- a quick dump during development and a high resolution plot using the
- intrinsic 4096 x 3120 data scaled to the printer's highest resolution.
-
- Two sizes and/or orientations of the output picture may be chosen.
-
- 17. Zooming
- A mouse-directed or arrow-key-directed cursor selects the region to fill
- the screen when zooming. If demagnification is specified the entire
- picture is shrunk into the designated area. If the cursor ticks are
- positioned nearly horizontally the picture aspect ratio remains the same.
- If they are positioned diagonally, different scale factors are called for
- in the horizontal and vertical directions.
-
- CLRTEST.C and SAMPLE.C are sample source programs illustrating some of the kinds
- of GraphiC functions and their use in generating displays.
-
- If you want to use a plotter, run penset to select the pen colors. For Hewlett
- Packard plotters use 8 data bits and 1 stop bit.
-
- The following is a complete list of the GraphiC routines and a brief
- description of their function.
-
- ***** INITIALIZATION ROUTINES *****
-
- ******************************************************************
- bgnplot(monitor, screentype, filename)
-
- bgnplot() opens an output file to receive the Tektronix formatted data,
- initializes the defaults for many parameters, and loads the video driver.
-
- ******************************************************************
- GPC_MAIN()
-
- GPC_MAIN() is a macro that you should use in place of the usual main() C
- function to provide compatibility between GraphiC for DOS anf GraphiC/WIN.
-
- ******************************************************************
- startplot(color)
-
- startplot() initializes each screen of plots, switches to graphics mode,
- sets the background color, and puts the information necessary to
- initialize the plot on re-play into the TKF file.
-
- ***** ACCESSING TEXT MODE AFTER GRAPHIC STARTS *****
-
- After GraphiC is initiated via a call to bgnplot(), GraphiC expects all
- screen output to be in a graphical form. However, you might also want to
- display numbers or other text-mode items as your program calculates.
- GraphiC has two different methods of doing this depending upon whether
- you are in a DOS or in a windowed environment.
-
- ******************************************************************
- gpcTextMode(on_off)
-
- GPCTextMode() is a macro that behaves somewhat differently in
- DOS and windowing environments.
-
- In non-windowed environments gpcTextMode() allows
- you to return to text mode after GraphiC has been initiated by a call
- to bgnplot(). GraphiC must be returned to graphics mode before
- any graphics are produced, and before the call to endplot().
- It is quite important that you return to graphics mode when graphics
- are produced or your program may hang up. Also, the graphics screen
- will not be restored, so it is best to arrange for your text-mode
- output to occur before the call to startplot() or after the
- call to endplot() in a multi-plot program. Text should be output
- using GPC_PUTS() for compatibility across platforms.
-
- In windowing environments, you can have GraphiC display
- a second window which will scroll all text that is output by GPC_PUTS()
- (see page L-). The window can accept text at any
- time, and remains active (although hidden) if on_off = 0.
-
- ***** PLOT TERMINATION ROUTINES *****
-
- ******************************************************************
- dateit(font)
-
- dateit() puts the date and time along the top edge of your current plot.
-
- ******************************************************************
- endplot(void)
-
- endplot() is called after each screen of plots is completed. It writes
- into the TKF file all of the remaining data for the plot and returns
- GraphiC to Level 1 and waits for instructions from the user. endplot()
- resets the page rotation to its upright position.
-
- You can avoid the wait for user input by using hardcopy('\n')
-
- ******************************************************************
- plotadd(void)
-
- A call to plotadd() after endplot() will redraw the previous plot and
- allow additional plotting to be added to the picture. When the additions
- are complete you must terminate the plot with another call to endplot().
-
- ******************************************************************
- stopplot(void)
-
- stopplot() is called at the very end of the plotting session. It empties
- the buffers and closes the plot files. It returns the screen to text mode
- and GraphiC to Level 0.
-
- ***** PAGE AND AXIS OPTIONS *****
-
- ******************************************************************
- acrop(mode)
-
- The default is to crop the lines at the edges of the plot region. To turn
- off this feature call acrop(1). This call automatically moves the cropping
- to the edge of the drawing page. The cropping is automatically reset to
- the default value after each call to curve drawing routines.
-
- ******************************************************************
- area2d(xinch, yinch)
-
- area2d() defines the lengths of the x and y axes.
-
- ******************************************************************
- autolegend(on_off)
-
- The legend feature automatically changes the line styles and colors
- of your curves when using curve().
-
- ******************************************************************
- axesoff(noaxes)
-
- axesoff() allows you to draw plots with no axes or axis labels.
-
- ******************************************************************
- axnamht(inch)
-
- axnamht() sets the height of the axis names for both axes. You can set
- them separately by calling xnamht() or ynamht().
-
- ******************************************************************
- box()
-
- box() draws a box around the area defined by the call to page().
-
- ******************************************************************
- cross(iscross)
-
- cross() makes the axes cross if either axis goes through zero.
-
- ******************************************************************
- CrossAt(x, y)
-
- CrossAt() allows you to specify the location along the axes where they
- will meet.
-
- ******************************************************************
- fgrid(lnstyle, ndiv)
-
- fgrid() allows you to draw one or more grid lines between adjacent
- axis tick marks.
-
- ******************************************************************
- frame(frameon, ftick)
-
- frame() allows you to put a box around the axis area.
-
- ******************************************************************
- grid(lnstyle)
-
- grid() draws lines through the tick marks using the line style of your
- choice.
-
- ******************************************************************
- gwindow(x0, y0, x1, y1)
-
- gwindow() causes the defined rectangle to stay clear while a picture is
- being drawn. After the first picture is completed, GraphiC will draw the
- next picture scaled to fit the window.
-
- GraphiC supports any number of windows, all active at one time. Included
- in these active windows are legends and string labels plotted with the
- putlabel() function. The legend uses one window and each call to
- putlabel() uses one window. All window information is contained in
- dynamically allocated structures. Each window uses 40 bytes of memory.
-
- ******************************************************************
- legend(marker, string, style, strhgt, scolor)
-
- legend() allows you to define a legend entry. This routine must be used in
- conjunction with legpos().
-
- ******************************************************************
- legpos(entries, xleg, yleg, border)
-
- legpos() sets the position of the legend and allocates memory for the
- number of entries specified.
-
- ******************************************************************
- metricunits(on_off)
-
- metricunits() allows you to specify whether GraphiC works in inch units or
- metric units.
-
- ******************************************************************
- numht(inch)
-
- numht() sets the size of the tick mark labels.
-
- ******************************************************************
- orel(xorel, yorel)
-
- Use orel() to shift the plot origin relative to the previous plot.
-
- ******************************************************************
- page(width, height)
-
- page() sets the size of the picture on the output page. The maximum size
- of the output page can be set using PlotLength() or PixPerUnit().
- Otherwise, the maximum picture size is 9.00" - 6.884" (unrotated) or
- 6.884" - 9.00" (rotated), corresponding to the size of the default output
- page. If you call page(FULLPAGE), the macro FULLPAGE will ensure that your
- picture area will be the same as that of the drawing page.
-
- ******************************************************************
- pbox(void)
-
- pbox() draws a box around the edges of the output page.
-
- ******************************************************************
- pgshift(xshift, yshift)
-
- pgshift() allows you to specify the lower left corner of the drawing area
- page with respect to the output page.
-
- ******************************************************************
- physor(xphysor, yphysor)
-
- physor() allows you to specify the location of the physical origon of the
- plot area within the page.
-
- ******************************************************************
- rightax(yright)
-
- rightax() is a parameter setting routine that will cause GraphiC
- to draw a right-hand y axis.
-
- ******************************************************************
- PlotLength(length)
- PixPerUnit(pixels)
-
- Since GraphiC supports variable output page sizes, GraphiC needs to
- know how to map the internal pixel coordinate system to your output
- device. You are free to specify this scaling, but we recommend that
- it match the plot length of an L printer dump that you specified
- when you set up your printer for use with GraphiC. If you make any
- other choice, the sizes on your printer output will not match the
- specifications in your program.
-
- This function must be called before page() or the scaling will
- not be correct.
-
- ******************************************************************
- plotabsolute(absolute_flag)
-
- By default GraphiC will not let the axes lengths to be bigger than the
- page specifications. plotabsolute() over rides this feature.
-
- ******************************************************************
- rotate(isrot)
-
- rotate() rotates the page 90 degrees (clockwise).
-
- ******************************************************************
- tickht(height)
-
- tickht() gives you full control over the appearance of tick marks on all
- plots.
-
- ******************************************************************
- titlht(inch)
-
- titlht() allows you to specify the height of the plot title.
-
- ******************************************************************
- upright(uplab)
-
- When upright(1) is called, a flag is set that causes the y
- axis labels to be plotted horizontally.
-
- ******************************************************************
- xfgrid(lnstyle, nxdiv)
-
- xfgrid() allows you to subdivide the x axis with grid lines or tick marks
- between major x axis dividions.
-
- ******************************************************************
- xgrid(isgrid)
-
- xgrid() draws lines through the x axis tick marks.
-
- ******************************************************************
- xlab(on_off, labstr)
-
- xlab() turns on or off the x axis string label option. When it is on, each
- string is positioned at a tick mark in the same way as numerical labels.
-
- ******************************************************************
- xLabAng(angle)
- yLabAng(angle)
- zLabAng(angle)
-
- These routines allow you to specify the angle that will be used to plot
- the axes tick labels.
-
- ******************************************************************
- xnamht(inch)
- ynamht(inch)
-
- These routines allow you to specify the height of the axes names.
-
- ******************************************************************
- yfgrid(lnstyle, nydiv)
-
- yfgrid() allows you to subdivide the y axis with grid lines or tick marks
- between major y axis dividions.
-
- ******************************************************************
- ygrid(isgrid)
-
- ygrid() draws lines through the y axis tick marks.
-
- ******************************************************************
- ylab(on_off, labstr)
-
- ylab() turns on or off the y axis string label option. When it is on, each
- string is positioned at a tick mark in the same way as numerical labels.
-
- ***** Simultaneous Plots *****
-
- GraphiC provides facilities for ploting points simultaneously on many
- axes so that you can view several aspects of a calculation or data input
- at the same time.
-
- ******************************************************************
- context(plot_number)
-
- Call context() to change the active page and/or axes region when plotting.
-
- ******************************************************************
- simuplot(numplots)
-
- simuplot() allocates data structures for the number of plots specified.
-
- ***** 2-D Axes Routines *****
-
- GraphiC provides two types of axis routines, user-scaled and auto-scaled.
-
- LINEAR AXES:
-
- ******************************************************************
- graf(xformat, xori, xste, xmax, yformat, yori, yste, ymax)
-
- graf() is the primary axis setup routine for x-y plots. The scaling will
- fixed according to the input parameters (user-scaled).
-
- ******************************************************************
- scales(nxdiv, nydiv, x, y, npts)
-
- scales() is the self-scaling routine for linear plots. It calculates the
- maximum and minimum values of x and y, and chooses the appropriate set of
- round numbers to use as axis labels and then calls graf().
-
- LOGARITHMIC AXES:
-
- ******************************************************************
- lglgscle(x, y, npts)
-
- lglgscle() produces self-scaling log-log plots.
-
- ******************************************************************
- loglog(xori, xmax, yori, ymax)
-
- loglog() is used to make user-scaled log-log plots.
-
- ******************************************************************
- SetLogBase(base_x, base_y)
-
- SetLogBase() allows you to set the log base for the axes in a log plot.
- The default is base 10. You can use the character 'e' or 'E' to set the
- base to the natural logarithm.
-
- ******************************************************************
- xlgscle(nydiv, x, y, npts)
-
- The self-scaling axis routine xlgscle(), finds the correct number of
- decades so that the logarithmic x axis can accommodate the data. Labels on
- log axes are always placed at the decade markings. Intermediate points are
- labeled depending on the spacing between divisions. The y axis is linear.
-
- ******************************************************************
- ylgscle(nxdiv, x, y, npts)
-
- The self-scaling axis routine ylgscle(), finds the correct number of
- decades so that the logarithmic y axis can accommodate the data. Labels on
- log axes are always placed at the decade markings. Intermediate points are
- labeled depending on the spacing between divisions. The x axis is linear.
-
- ******************************************************************
- xlog(xori, xmax, yformat, yori, yste, ymax)
-
- xlog() is a user-scaled routine for drawing an x log axis with a linear y
- axis.
-
- ******************************************************************
- ylog(xformat, xori, xste, xmax, yori, ymax)
-
- ylog() is a user-scaled routine for drawing an y log axis with a linear x
- axis.
-
- LABELING ROUTINES:
-
- ******************************************************************
- heading(title)
-
- heading() sets the program up so that when the axes drawing routine is
- called the plot will be titled.
-
- ******************************************************************
- xname(xlabel)
-
- xname() sets the program up so that when the axes drawing routine is
- called the x axis will have a name.
-
- ******************************************************************
- yname(ylabel)
-
- yname() sets the program up so that when the axes drawing routine is
- called the y axis will have a name.
-
- LINEAR FUNCTIONS:
-
- ******************************************************************
- bar(nxdiv, x, y, npts, bwid, mode, carray, typearray)
-
- bar() draws a bar chart. Bars are centered on the x datum values. They may
- be based on the lower edge of the grid space or on the y = 0 line.
- Segmented bars, showing the addition of several components, or offset bars
- can be made by using repeated x[] values. In these cases, npts is greater
- than nxdiv; otherwise these two arguments should be equal. To prevent the
- bars from being drawn on the axes and overhanging the end of the axes, be
- sure that the first value in the x array is not the same as the x origin,
- and in the call to graf(), make xmax one x interval greater than the
- actual maximum x value.
-
- ******************************************************************
- curve(x, y, npts, sym)
-
- Each time curve() is called, a curve is drawn on the plot in the current
- color. Sixteen different symbols can be used as curve markers, and nine
- different line styles are available. The line and symbol styles can be
- changed automatically by using the legend feature or manually by calling
- the appropriate routine. curve() is used for any of the linear or
- logarithmic plots.
-
- Scatter plots may be drawn by calling scatplot() with a 1 before calling
- curve(). You can still draw symbols every sym points.
-
- ******************************************************************
- curvfill(x, y, npts, x1, y1, npts1, pcolor, curves)
-
- curvfill() will fill the area between two curves with the desired
- solid color or pattern.
-
- ******************************************************************
- errorbar(x, xmin, xmax, y, ymin, ymax)
-
- Using errorbar(), a user can plot an error bar at any point on the curve.
- Different line styles are available for the bars by calling dashf().
-
- ******************************************************************
- histogram(x, y, npts, type, colors)
-
- A histogram is similar to a bar chart, except that in a histogram, the
- right edges of the bars fall on data values.
-
- ******************************************************************
- scatplot(dot)
-
- For drawing scatter plots, scatplot() sets a flag that causes
- curve() to draw points only. If the last argument to curve()
- is a 0, curve() will draw a dot at every point. Otherwise curve()
- will behave normally.
-
- ******************************************************************
- staircase(x, y, xnew, ynew, npts, mode)
-
- This function transforms the input vectors into a "staircase" set of
- output vectors. The y value is held constant between x data points and
- jumps vertically between levels. The jump points are determined by the
- variable mode. The effect is as if a bar plot were drawn with touching
- bars, and the staircase is the curve of the bar tops.
-
- ***** Smith Charts *****
-
- ******************************************************************
- getrho(&rho, &theta)
-
- getrho() returns the reflection coefficient and the angle at the current
- position on the Smith chart. The position is determined by a plot??() call
- or by a smove() call.
-
- ******************************************************************
- getrx(&R, &X)
-
- getrx() returns the resistance and reactance at the current position on
- the Smith chart. The position is determined by a plot??() call or by a
- smove() call.
-
- ******************************************************************
- plotrho(rho, theta)
-
- plotrho() puts a point on the Smith chart corresponding to the value of
- the reflection coefficient.
-
- ******************************************************************
- smdraw(lcolor)
-
- Draws a Smith chart type of grid. Lengths normalized to the characteristic
- impedance should be used in the functions that put points and lines on the
- grid.
-
- ******************************************************************
- plotrx(R, X)
-
- plotrx() puts a point on the Smith chart corresponding to the impedance
- looking into the line at a point on the line, or at the load.
-
- ******************************************************************
- smithcir(u, v, radius)
-
- smithcir() draws a circle on a Smith chart.
-
- ******************************************************************
- smove(del)
-
- smove() draws a line on a Smith chart at constant rho from the present
- position (determined by plotrx() or plotrho()).
-
- ***** Polar Plots *****
-
- ******************************************************************
- polar(mode)
-
- polar() allows you to make polar contour plots.
-
- ******************************************************************
- polcurve(r, theta, dim, sym)
-
- polcurve() draws a curve corresponding to the vector r, on a polar grid.
- If r is logarithmic, the previous call to polgrid() will provide cropping
- for the curve at the minimum circle.
-
- ******************************************************************
- polgrid(rmax, rmin, mode, larray, dim, ntheta, col)
-
- polgrid() draws a polar grid.
-
- ******************************************************************
- wedge(rmin, rmax, thmin, thmax, pattern, border)
-
- wedge() draws a wedge-shaped region on a polar coordinate plot and fills
- it. Unlike a pie slice, the inner tip of the wedge only goes to rmin
- instead of 0.
-
- ***** Contour Plots *****
-
- Contour plots can be drawn in conjunction with 3-D plots by following the
- instructions given under plane3d().
-
- In addition to drawing a contour plot in a plane of the 3-D workbox, you
- can draw contour plots as elevated or stacked contours. This can be done
- by establishing a 3-D workbox, calling plane3d(), and calling stack(1).
- This feature can be used to superimpose a contour plot on a 3-D surface.
- Stacked contours do not have hidden line removal activated.
-
- GraphiC can also be used to create triangle plots. Triangle plots are a
- special kind of contour plot. They provide for the graphic display of an
- attribute of a three-component mixture. Each component is associated with
- a vertex. The fraction of that component is plotted on a line parallel to
- the opposite side. The position of the line is proportionally closer to
- the vertex depending on the relative amount of the component. Any two
- components determine the position of a point. GraphiC draws constant-value
- contours of the attribute.
-
- The user has two options for triangle plots. You can specify a functional
- relationship between the attribute and two of the parameters or you can
- provide a table of values. The contours cannot be labeled automatically
- because of the mapping scheme used to generate them. They can, however,
- have different colors and/or line styles, which can be displayed and
- identified in a legend box.
-
- Polar contour plots are created by setting up polar axes and making a call
- to polar() before your call to any contour-plotting routines. The x array
- in the contour plot corresponds to the radial direction in polar
- coordinates, and the y array corresponds to the angular direction in polar
- coordinates.
-
- Setting z-values in a user-supplied matrix or in a function
- return value to a special value (called Not A Number, or NAN
- for short) will tell the contour plotter that data is missing, and
- contours will not be drawn through the cells so marked.
-
- GraphiC allows you to define several types of NANs
- to allow you to represent data values that are missing,
- bad, or undefined. GraphiC ignores these values when doing contour
- plots and 3-D surface plots. As a result, your data can be defined
- on a non-rectangular domain.
-
- ******************************************************************
- conmat(zmat, x, nx, y, ny, min, step, max, lnstyle, labint)
- conmat2(zmat, x, nx, y, ny, min, step, max, lnstyle, labint)
-
- conmat() and conmat2() produce level contours for the array z[y][x]. That
- is, for each level C, the curve z[y][x] = C is plotted.
-
- ******************************************************************
- conmatr(x, y, z, npts, xgmin, xgmax, nxpts, ygmin, ygmax, nypts, zorig,
- zstep, zmax, lnstyle, labint)
-
- conmatr() produces a contour plot from irregularly spaced data points.
-
- ******************************************************************
- contcolor(colors, bord, line_styles)
-
- Use contcolor() to set the attributes of your contours.
-
- ******************************************************************
- contour(fun, x, nx, y, ny, min, step, max, lnstyle, labint)
-
- contour() produces level contours for the function fun(x,y). That is, for
- each value of level C, the curve fun(x,y) = C is plotted.
-
- ******************************************************************
- GetContour(size, x, y, level)
-
- GetContour() allows you to obtain the x, y coordinate pairs for any single
- contour in a contour plot.
-
- ******************************************************************
- lconmat(zmat, x, nx, y, ny, level, lnstyle, nlevel, labint, format)
- lconmat2(zmat, x, nx, y, ny, level, lnstyle, nlevel, labint, format)
-
- lconmat() and lconmat2() produces level contours for the array z[y][x].
- That is, for each level C, the curve z[y][x] = C is plotted.
-
- ******************************************************************
- lcontour(fun, x, nx, y, ny, level, nlevel, lnstyle,labint, format)
-
- lcontour() produces level contours for the function fun(x,y). That is, for
- each level C, the curve fun(x,y) = C is plotted.
-
- ******************************************************************
- patchmat(*zmat, *x, nx, *y, ny, minv, maxv, type, *intensity, nintensity,
- border, legllx, leglly, legurx, legury, labint, *format, font, height,
- nsmear)
-
- This routine makes a patch plot. Each cell in the grid is filled with a
- panel whose color is related to the values on the grid. There is an option
- that allows the user to make a "smeared" contour plot as well.
-
- ******************************************************************
- stack(stacked)
-
- Calling stack() with a 1 will allow you to superimpose a contour plot on a
- 3-D surface or create contour rings that are elevated.
-
- TRIANGLE PLOTS:
-
- ******************************************************************
- trifun(fun, dim, zmin, zstep, zmax, lnstyle, border)
-
- trifun() draws a triangle plot based on data generated by the function
- fun().
-
- ******************************************************************
- trimat(a, b, z, dim, ngrid, zmin, zstep, zmax,
- lnstyle, border)
-
- trimat() draws a triangle plot based on the input values a, b, z.
-
- ******************************************************************
- aname(alabel)
-
- aname() sets the name for the 'A' axis on a triangle plot.
-
- ******************************************************************
- bname(blabel)
-
- bname() sets the name for the 'B' axis on a triangle plot.
-
- ******************************************************************
- cname(clabel)
-
- cname() sets the name for the 'C' axis on a triangle plot.
-
- ******************************************************************
- trinamht(inch)
-
- trinamht() allows you to set the height of the axis-name labels on
- triangle plots.
-
- ***** Three-Dimensional Plots *****
-
- ******************************************************************
- base(isbase, color)
-
- A call to base() will cause a box to be drawn around the x-y plane at the
- base of the z axis, connected to the corners fo the 3-D surface.
-
- ******************************************************************
- bcolor(value)
- tcolor(value)
-
- bcolor() and tcolor() allow you to assign different colors
- to the top and bottom of a 3-D surface.
-
- ******************************************************************
- box3d()
-
- box3d() draws the 3-D workbox.
-
- ******************************************************************
- curv3d(x, y, z, npts)
-
- curv3d() plots parametric curves in three-dimensional space.
- There is no hidden line removal with curv3d().
-
- ******************************************************************
- d3bars(barson)
-
- Calling d3bars() with a positive real argument sets the 3-D bars mode.
- Bars are drawn instead of the default wire-mesh pattern when any of the
- surface plotting routines are called.
-
- ******************************************************************
- d3color(array, nlevel, mesh)
-
- d3color() causes a 3-D surface to be filled with the colors specified in
- array.
-
- ******************************************************************
- d3head(title, place)
-
- d3head() defines the plot title and it's location on a 3-D plot.
-
- ******************************************************************
- d3line(xf, yf, zf, xt, yt, zt)
-
- d3line() draws a line from (xf, yf, zf) as defined in user units.
-
- ******************************************************************
- d3pltfnt(x, y, z, string, height, angle)
-
- d3fntplt() plots a string at the location x, y, z in the plane of the
- paper.
-
- ******************************************************************
- graf3d(xorig, xstep, xmax, yorig, ystep, ymax, zorig, zstep, zmax)
-
- graf3d() determines the scaling and labeling of the axes.
-
- ******************************************************************
- nohide(visible)
-
- nohide() disables hidden line removal.
-
- ******************************************************************
- panel3d(x, y, z, nsides, pattern, border)
-
- The panel3d() function allows you to define a panel in 3-D space.
-
- ******************************************************************
- sclfix(isfixed)
-
- sclfix() allows the user to draw several 3-D surfaces using the same
- scaling.
-
- ******************************************************************
- surfun(zfun, ixpts, xdel, iypts, ydel)
-
- surfun() draws the surface z = zfun(x, y) as a grid of lines parallel to
- the x and y axes.
-
- ******************************************************************
- surmat(zmat, xdim, ydim)
- surmat2(zmat, xdim, ydim)
- surmatc(zmat, xdim, ydim, ixpts, iypts)
- surmatc2(zmat, xdim, ydim, ixpts, iypts)
-
- The surmat() family of functions draws a surface from a data matrix that
- you supply.
-
- ******************************************************************
- surmatr(x, y, z, npts, xgmin, xgmax, nxpts, ygmin, ygmax, nypts)
-
- surmatr() produces a 3-D surface from irregularly spaced data
- points.
-
- ******************************************************************
- survis(which)
-
- survis() allows you to specify which side(s) of a surface will be visible.
-
- ******************************************************************
- view(xvu, yvu, zvu)
- vuabs(xvu, yvu, zvu)
- vuangl(phi, theta, radius)
-
- view(), vuabs() and vuangl() allow you to specify the position of the
- 'eye' with respect to the 3-D workbox. The units are in plot, workbox or
- angle/radius respectivly.
-
- ******************************************************************
- volm3d(xlength, ylength, zlength)
-
- volm3d() determines the length/width/height ratios of the workbox.
-
- ******************************************************************
- x3name(xname)
- y3name(yname)
- z3name(zname)
-
- These routines provide names for the 3-D axes.
-
- 2-D PLOTS IN A 3-D PLANE:
-
- The entire range of plotting functions is available to plot in a plane
- defined by the calls to the 3-D plotting functions. Once the 3-D workbox
- has been defined, you can use these functions to plot 2-D graphs,
- lines, curves, or text in the plane you define. This feature allows
- you to draw projections of a surface onto a wall of the workbox or
- draw a contour plot that corresponds to the surface in the x-y
- plane at any value of z etc.
-
- ******************************************************************
- d3grid(subdiv, toplab)
-
- This routine can be used to grid a 3-D plot or establish a grid on
- which to plot a projected curve.
-
- ******************************************************************
- plane3d(plane, position, hide)
-
- After a call to plane3d() all line drawing will be scaled to
- the 3-D workbox established by the most recent call to graf3d().
-
- ***** Pie Charts *****
-
- ******************************************************************
- pieplot(nslices, seg, clr, offset, caption, size, border, txtclr)
-
- This routine allows you to make pie charts with one or all the slices
- offset from the center.
-
- ***** Box and Whiskers Plots *****
-
- BoxPlot(x, y, ydim, outlier, symnum, width)
-
- BoxPlot() draws a box and whisker plot.
-
- ***** Error Function Plots *****
-
- The x axis of an error function (ERF) plot is scaled on
- cumulative percentage. The y axis is scaled linearly. Results
- for a normal distribution (bell curve) are expected to be a straight
- line on the ERF grid.
-
- ******************************************************************
- erfcurve(x, y, npts, sym)
-
- erfcurve() plots the x and y data on an ERF grid.
-
- ******************************************************************
- erfgrid(ymin, ystep, ymax, yformat)
-
- erfgrid() draws the axes and grid lines that appear on ERF or "percent"
- paper.
-
- ******************************************************************
- erfscales(nydiv,y, npts)
-
- erfscales() routine is the self-scaling routine for ERF plots. It uses the
- y data to calculate the y axis scaling parameters and then calls
- erfgrid().
-
- ***** Line-Drawing Routines *****
-
- ******************************************************************
- ellipse(xc, yc, xr, yr, rotation, th1, th2, degrees, units)
-
- ellipse() draws an ellipse segment in the specified units. If xr == yr a
- circle will be drawn.
-
- ******************************************************************
- fillellipse(on_off, pattern, border, units)
-
- If on_off = 1, all future circles and ellipses will be filled with the
- specified pattern.
-
- ******************************************************************
- linch(xfinch, yfinch, xtinch, ytinch, newcurve)
-
- linch() draws a line between two points whose coordinates are specified in
- inches (or cm) with respect to the lower left corner of the drawing page.
-
- ******************************************************************
- line(xfrom, yfrom, xto, yto, newcurve)
-
- Occasionally it is more convenient to draw a line directly on the graphic
- bit map. line() draws a line between (xfrom, yfrom) and (xto, yto), with
- the dimensions given as pixels on the 8192 - 6267 GraphiC pixel grid.
-
- ******************************************************************
- radlin(xpos, ypos, rad1, rad2, theta)
-
- radlin() is used to draw a piece of a radial line in a circle.
-
- ******************************************************************
- uline(xfrom, yfrom, xto, yto, newcurve)
-
- uline() is the same as line() except that all coordinates are scaled in
- user units.
-
- ******************************************************************
- uradlin(xpos, ypos, rad1, rad2, theta)
-
- uradlin() is the same as radline() except all coordinates are scaled in
- user units.
-
- ******************************************************************
- uvector(xfrom, yfrom, xto, yto, ltow, size, "type")
-
- uvector() is the same as vector() except that the ends are located in user
- units.
-
- ******************************************************************
- vector(xfrom, yfrom, xto, yto, ltow, size, "type")
-
- vector() draws an arrow from (xfrom,yfrom) to (xto,yto) with the
- coordinates in inch units.
-
- ***** Line and Symbol Styles *****
-
- ******************************************************************
- dashf(style)
-
- dashf() sets the line style to one of the GraphiC line styles.
-
- ******************************************************************
- symbol(x, y, symnum)
-
- symbol() plots a marker symbol centered at x,y. Units are in plot
- coordinates.
-
- ******************************************************************
- syminch(x, y, symnum)
-
- syminch() is like symbol() except that units are in inches.
-
- ******************************************************************
- symht(height)
-
- symht() changes the size of the symbols used as curve markers.
-
- ******************************************************************
- sympick(symnum)
-
- sympick() selects the symbol that will be used when curve() is used.
-
- ******************************************************************
- tcurve(width) or ticurve(width)
-
- tcurve() causes curve to draw thick curves as specified by the size of
- width. For tcurve() width is pixels and for ticurve() width is inches.
-
- ******************************************************************
- tline(width) or tiline(width)
-
- tline() and tiline() set the line thickness for all lines. For tline()
- width is pixels and for tiline() width is inches.
-
- ***** Color *****
-
- GraphiC supports three sets of colors:
-
- IBM colors, 0 - 15.
- Tektronix dithered colors, 50 - 174.
- GraphiC RGB colors, 200 - 447.
-
- The GraphiC RGB colors include the
- standard IBM colors and a 16-level gray scale.
-
- When output devices cannot support extended colors, GraphiC uses dither
- patterns to approximate the color. In order to use dither patterns on
- lines, the line width will be increased automatically by GraphiC.
-
- There are many representations of color that are used for different
- purposes. GraphiC uses the RGB (red, green, blue) system which is most
- appropriate for video systems. GraphiC provides routines to convert colors
- from one system to another, or for matching RGB values to the closest
- GraphiC color.
-
- ******************************************************************
- color(value)
-
- color() sets the line color to value.
-
- ******************************************************************
- GRCtoIBM(i, rgb, *IBMcolor)
-
- This routine allows you to extract the RGB values from a GraphiC color
- and to obtain the closest IBM color number.
-
- ******************************************************************
- HLStoRGB(h, l, s, r, g, b)
-
- HLStoRGB() converts color representations in the HLS color system to the
- RGB system.
-
- penchg() does not exist in GraphiC/WIN. You control the behavior of the
- output device through the Windows control panel.
-
- ******************************************************************
- RGBtoCMY(r, g, b, c, m, y)
-
- This routine converts colors in the RGB representation to the CMY
- representation.
-
- ******************************************************************
- RGBtoCMYK(r, g, b, c, m, y, k)
-
- This routine converts colors in the RGB representation to the CMYK
- representation that is usually used for four-color printing.
-
- ******************************************************************
- RGBtoGPC(r, g, b, IBMcolor)
-
- This function returns the closest GraphiC RGB color value as well as the
- closest IBM color.
-
- ******************************************************************
- RGBtoHLS(r, g, b, h, l, s)
-
- RGBtoHLS() converts color representations in the RGB color system to the
- HLS system.
-
- ******************************************************************
- RGBtoIBM(rgb)
-
- This routine returns the closest IBM color to a given set of R, G, and B
- values.
-
- ******************************************************************
- penchg(mode)
-
- penchg() causes GraphiC to pause when printing to a single pen plotter
- when there is a color change so that you may change the pen.
-
- **** Text Routines ****
-
- The same fonts that are used to label plots may be used to write legends
- or to make text viewgraphs for presentations. A large selection of fonts
- is available. Any four of them may be active at once. To use these fonts,
- you should be aware of how the font routines are implemented.
-
- Each font runs from ASCII character 32 (a space) through 199 (there is no
- character 127). Each character is stored as a series of vectors so that it
- may easily be changed in size or rotated. Characters may be plotted in any
- height and at any angle in one-degree increments from the horizontal. They
- may be skewed to the right or to the left, and their aspect ratio may be
- changed. The thickness of the lines that make up the character may be
- changed, as well as the color of the character. Strings also may be
- plotted along an arc.
-
- Tabs may be embedded into strings by using an ordinary tab character
- (ASCII 9). The tabs are expanded into the number of spaces determined by
- tabspace() and do not cause a jump to a particular column. Data and text
- may be combined into a string by using the sprintf() C library routine.
- The active fonts may be changed at any time by calling font(). A font
- selection character must be used at the beginning of every string;
- otherwise, the last active font will be used. Initially, the first font
- listed in the call to font() will be active.
-
- GraphiC supports unlimited levels of super- and subscripts in a manner
- that is very easy to use. Each level of script is plotted in a smaller-sized
- font. The size and offset may be controlled.
-
- You can change the color within a string.
-
- ******************************************************************
- charspc(width)
-
- charspc() allows you to set the spacing of the characters
-
- ******************************************************************
- circtxt(x, y, r, string, height, angle)
-
- circtxt() plots a string along an arc.
-
- ******************************************************************
- ctline(string, height)
-
- ctline() centers a line of text on the page between the left margin and
- the right margin.
-
- ******************************************************************
- rtline(string, height)
-
- rtline() puts a line of text on the page ending at the right margin.
-
- ******************************************************************
- ltline(string, height)
-
- ltline() puts a line of text on the page beginning at the left margin.
-
- ******************************************************************
- fbox(boxon, size)
-
- fbox() will put a box around each string until it is turned
- off. This can be useful for highlighting pieces of text. This routine
- should be used only for upright text.
-
- ******************************************************************
- lcrline(lstr, hl, cstr, hc, rstr, hr)
-
- lcrline() plots three text strings in a single line in page units. The
- string lstr is left justified. The string cstr is centered. The string
- rstr is right justified.
-
- ******************************************************************
- fntchg(symbol)
-
- fntchg() allows you to change the active font.
-
- ******************************************************************
- G_CDECL font(int nfont, ...)
-
- font() loads the requested fonts. Up to four fonts may be activated at
- once.
-
- ******************************************************************
- fontfill(fill, fill_pattern, border_color)
-
- fontfill() allows you to control the appearance fo the filled font
- characters. This class of font can be displayed as an outline font, a
- solid font with no border or a solid font with a border of a different
- color from the body of the character.
-
- ******************************************************************
- gpcGetCharWidth(font, nchar, width)
-
- gpcGetCharWidth() retrieves the width of any specified character.
-
- ******************************************************************
- gpcGetWidestChar(font, nchar, width)
-
- gpcGetWidestChar() retrieves the widest character in a font and its width.
-
- ******************************************************************
- setspacing(char_space, font)
-
- With the use of this function, all characters in the selected font
- will be equally spaced. This allows you to create a table or column
- and have the column entries line up.
-
- ******************************************************************
- gtext(mode)
-
- gtext() allows the insertion of text as a string instead of a series of
- strokes into the output file. The PostScript support provides for the
- substitution of a PostScript font for the inserted string.
-
- ******************************************************************
- GTfont(font_number)
-
- This call inserts a 4107 escape sequence into the TKF
- file. When the file is converted to PostScript, the chosen font will
- be used for any GrafText strings.
-
- ******************************************************************
- linesp(ratio)
-
- linesp() should be used to vary the spacing between your lines
- of text.
-
- ******************************************************************
- lmargin(inch)
-
- lmargin() sets the location of the left text margin.
-
- ******************************************************************
- rmargin(inch)
-
- rmargin() sets the location of the right text margin.
-
- ******************************************************************
- trmargin(inch)
-
- tmargin() sets the location of the top text margin.
-
- ******************************************************************
- nullsym(symbol)
-
- nullsym() allows you to specify which character GraphiC will use to print
- the special characters used to indicate superscript, subscript etc.
-
- ******************************************************************
- pltfnt(x, y, string, height, angle)
-
- pltfnt() "plots" the character string on your plot at a location which is
- specified in the units of your plot.
-
- ******************************************************************
- prtfnt(x, y, string, height, angle)
-
- prtfnt() "prints" the character string on your plot at a location which is
- specified in the inch units.
-
- ******************************************************************
- putlabel(string, xpos, ypos, height, border, units)
-
- putlabel() allows you to put a label inside a protected window anywhere on
- the plot. The label string is automatically placed in a close-fitting
- window with the lower left corner of the string at xpos, ypos. Position
- units can be user, inch, or pixel.
-
- ******************************************************************
- scrht(factor)
-
- Each level of super- or subscript is made smaller by factor.
-
- ******************************************************************
- scrshft(shift)
-
- Each level of super- or subscript is raised or lowered by shift times the
- font height.
-
- ******************************************************************
- setscale(scflag)
-
- setscale() allows you to tell GraphiC whether you want font plotting
- routines to scale to the size of your page or to be the exactly as
- specified.
-
- ******************************************************************
- skew(skewfac)
-
- skew() sets the fraction of the character height by which the top of the
- character is shifted with respect to the bottom.
-
- ******************************************************************
- strwidth(string, height)
-
- strwidth() returns the half-width of the character string.
-
- ******************************************************************
- subsym(symbol)
-
- subsym() sets the character which will be used to indicate the start of a
- sup-script.
-
- ******************************************************************
- supsym(symbol)
-
- supsym() sets the character which will be used to indicate the start of a
- super-script.
-
- ******************************************************************
- symoff(on_off)
-
- symoff() causes all special symbols to be printed.
-
- ******************************************************************
- tabspace(space)
-
- tabspace() sets the number of spaces (ASCII 32) to be used by a tab.
-
- ******************************************************************
- tfont(hwid)
-
- tfont sets a parameter that specifies the width of lines used to make
- thick fonts.
-
- ******************************************************************
- widen(widfac)
-
- widen() is used to change the aspect ratio of a font.
-
- ***** Cross Hairs *****
-
- The cross-hairs feature lets you do several things
- with your plot after it has been drawn. In cross-hair mode it is possible
- to read point values in inches, user units or pixels, mark point values
- for future use, or draw lines from point to point. You can also follow the
- points along a curve and add annotations to your plot.
-
- Movement of the cross hairs is controlled by the arrow keys or a supported
- mouse.
-
- ******************************************************************
- curson(srow, scol, **fx, **fy, *find)
-
- curson() displays a digital readout on the screen at the location srow,
- scol in an 8 - 10 pixel font. The cross hair is displayed, and all of the
- cursor functions are enabled.
-
- ******************************************************************
- curvefollow(srow, scol, x, y, npts)
-
- curvefollow() displays a digital readout on the screen at the location
- srow, scol in an 8 - 10 pixel font and the cross hairs are displayed.
- Using the left and right arrow keys, you can move the cross hairs from
- point to point on the curve given by x and y.
-
- This mode allows visual selection and readout of the points along the
- curve. In contrast to the curson() functions, the displayed values for x
- and y are taken directly from the input vectors, and hence are not subject
- to the roundoff and discretization errors that occur if the screen point
- is converted to user units.
-
- **** Plot Insertion *****
-
- ******************************************************************
- insert(readfile, picnum, llx, lly, ysize, irot)
-
- insert() is a powerful feature allowing you to
- postprocess plots by scaling, shifting, and combining them.
-
- **** Program Timer *****
-
- ******************************************************************
- set_time(timer)
-
- set_time() zeros a clock to initiate a timing cycle. Four timers are
- supported and set by the value of timer.
-
- ******************************************************************
- char *get_time(timer)
-
- get_time() measures the elapsed time since set_time(timer) was called and
- returns it as a pointer to an internal string. The format is:
- hours:minutes:seconds.tenths.
-
- **** Character Input Routines *****
-
- ******************************************************************
- ciq(void)
-
- ciq() waits for and returns a standard ASCII character from the keyboard.
-
- ******************************************************************
- unsigned int cstsq(void)
-
- cstsq() polls the keyboard input buffer and returns a standard ASCII
- character if one is waiting.
-
-
- ******************************************************************
- ci_scq(void)
-
- ci_scq() returns the scan code of the key in the high byte and the
- character in the low byte. It can be used to read all of the PC keys.
- ci_scq() waits for user input.
-
- ******************************************************************
- ci_sc1q(void)
-
- ci_sc1q() returns the scan code of the key in the high byte and the
- character in the low byte. ci_sc1q() returns a 0 if no character is
- available.
-
-
- ***** Character Output Routines *****
-
- GRAPHICS MODE:
-
- These routines are used to display text on the graphic screen using
- an 8 - 10 pixel matrix font. The routines are very fast,
- and they put no information into the TKF file. Thus,
- they cannot be printed. Because the font is based on pixels, the size
- of the characters will depend upon the screen resolution.
-
- ******************************************************************
- putsgq(string, row, col)
-
- putsgq() puts a string on the graphics screen using a matrix font at the
- location row, col.
-
- ******************************************************************
- lclrq(row, minl, maxl)
-
- lclrq() clears the graphics screen according to the arguments specified. A
- row is ten screen pixels high and a column is eight pixels wide.
-
- TEXT MODE:
-
- ******************************************************************
- GPC_PUTS(string)
-
- GPC_PUTS() is a macro that displays strings in text mode in
- both windowed and in non-windowed environments.
-
- **** Statistical Functions *****
-
- ******************************************************************
- crosscorrelate(x, y, cvec, dim, avg)
-
- Calculate the cross-correlation function for two functions. If they
- are the same, the auto-correlation function will be calculated.
-
- ******************************************************************
- mean(x, xdim)
-
- mean() returns the average of the vector x.
-
- ******************************************************************
- median(x, xdim)
-
- median() returns the median of the vector x. If xdim is odd, the central
- element of the sorted array is returned. Otherwise, the average of the two
- central elements is returned.
-
- ******************************************************************
- StdDev(x, xdim)
-
- StdDev() returns the square root of the variance of x.
-
- ******************************************************************
- variance(x, xdim)
-
- variance() returns the variance of x incorporating Bessel's correction to
- the standard deviation.
-
- ***** Smoothing *****
-
- ******************************************************************
- rfit(x, y, npts, nits, sfact, nout, xout, yout)
-
- rfit() uses weighted linear regression to calculate a smoothed set of
- points to scattered data. A piece-wise linear least square fit is made at
- each point. Spline smoothing is used to fill in extra points.
-
- ******************************************************************
- smear(minout,nx, ny, insmear)
-
- smear() smears an input matrix nsmear times.
-
- ******************************************************************
- spline(x, y, n, n1, s1, s2, xn, yn)
-
- spline() provides smoothed two-dimensional linear values using a cubic
- spline routine.
-
- ******************************************************************
- spline3(x, y, z, nx, ny, n1x, n1y, xn, yn, zn)
-
- spline3() provides smoothed three-dimensional values using a
- cubic spline routine.
-
- **** Matrix Routines *****
-
- ******************************************************************
- matsolve(coeff, n, vector)
-
- matsolve() solves simultaneous linear equations where coeff
- is a square matrix. When the routine is called vector points
- the input matrix. On return vector points to the answer matrix.
-
- ******************************************************************
- matinverse(input, output, n)
-
- matinverse() loads matrix output with the inverse of matrix input.
-
- **** Panel Filling *****
-
- GraphiC provides polygon fills using the standard 16 IBM colors plus a
- choice of 16 geometric patterns, 125 dithered patterns, and 248 RGB color
- combinations.
-
- ******************************************************************
- panel(x, y, nsides, pcolor, border)
-
- Call panel() to define an area to be filled with color pcolor. Units are
- those of your plot. Multiple calls to panel() may be made to define
- several ploygons of the same color or polygons with holes.
-
- ******************************************************************
- panelinch(x, y, nsides, pcolor, border)
-
- panelinch() is like panel() except that the input vectors are in inches.
-
- ******************************************************************
- panel3d(x, y, z, nsides, pattern, border)
-
- The panel3d() function allows you to define a panel in 3-D space.
-
- ******************************************************************
- panproc()
-
- panproc() process all of the polygons defined in the call(s) to panel?().
- panproc() does the actual filling, and releases the memory that
- has been allocatedand resets all counters.
-
- ***** Memory Routines *****
-
- GraphiC provides a number of routines to allocate, reallocate and free
- memory that automatically provide the required actions on all the
- platforms supported by GraphiC. In addition, the GraphiC memory routines
- provide valuable debugging options to prevent memory leaks and to check
- boundaries.
-
- If TESTMEM is defined, GraphiC will keep track of all memory allocated and
- freed using these routines in a linked list. When you call stopplot(),
- this list will be checked and if there is any unfreed memory, a message
- will appear.
-
- If TESTMEM2 (GraphiC/286 only) is defined, GraphiC will allocate every
- piece of memory in its own selector. Since the allocated memory is just
- long enough to accommodate the request, reading or writing past the end of
- the memory block will generate a protection fault, and the compiler's
- debugger will allow you to locate the error.
-
- ******************************************************************
- dim2(row, col, size)
-
- dim2() dynamically allocates 2-D arrays so that they can be quickly
- addressed using array notation. An array of pointers is allocated to point
- to the memory for each row. Then the memory for each row is allocated
- separately. This technique has three major advantages:
- 1) the size of each row can be up to 64<N>kb long.
- 2) the memory allocated for the array need not be contiguous.
- 3) the memory is addressed more quickly.
-
- ******************************************************************
- free2(mem_ptr)
-
- free2() frees all of the memory allocated by a call to dim2().
-
- ******************************************************************
- gpcalloc(nobj, size)
-
- Allocates a block of memory and zeros the contents.
-
- ******************************************************************
- gpcfree(mem_ptr)
-
- Frees a block of memory and sets the pointer to NULL.
-
- ******************************************************************
- gpcrealloc(mem_ptr, size)
-
- Reallocates a block of memory and copies the existing contents to the new
- memory block.
-
- ******************************************************************
- long HowMuchMem()
-
- HowMuchMem() returns the approximate number of bytes of memory
- currently available.
-
- **** Printer Output *****
-
- Printer output may be obtained interactively. After the picture is
- drawn there will be a beep, at which time you can enter the appropriate
- response.
-
- GraphiC can produce color separations suitable for four-color printing.In
- order to support other than the 16 pure colors, it is necessary that
- objects in the separations be printed in shades of gray. Only PostScript
- devices support this capability, so you can produce separations by
- printing to a PostScript printer or converting the output to PostScript.
- Alternatively, GraphiC's support for PostScript Level 2 means that such
- files are importable into desktop publishing packages such as Ventura
- Publisher<191>and they can produce the separations.
-
- After a plot is drawn, entering an 's' will display a menu that allows you
- to choose primary (red, green, blue) or secondary (cyan, magenta, yellow)
- color schemes. A black separation is also produced. Crop marks are added
- at the corners of the plots to allow the printer to align the four
- pictures for exact color registration. The color of each separation is
- also printed outside of the plot area.
-
- The following routines allow you to output to the printer from within a
- program.
-
- ******************************************************************
- hardcopy(type)
-
- hardcopy() allows GraphiC to make unattended hard copies of
- each GraphiC plot.
-
- ******************************************************************
- SetDefaultPrinter(int printer_num)
-
- SetDefaultPrinter() allows you to select an output device from within your
- program without having to use the 'P' option after the plot is complete.
-
- ***** Utility Routines *****
-
- ******************************************************************
- blank(char attr)
-
- blank() is used in text mode to erase the screen and set the screen
- attribute to attr.
-
- ******************************************************************
- gfopen(filename, mode, bigbuff)
-
- This is our function to open a file and return a file pointer. With this
- function your data files, font files, configuration files, etc can reside
- in any directories specified by the GraphiC environment variable. Multiple
- paths are supported.
-
- gfopen also uses the standard library function setvbuf() if requested to
- provide buffered file IO.
-
- ******************************************************************
- intopix(inch)
-
- intopix() converts a number of inches (or cm) to pixels.
-
- ******************************************************************
- pixtoin(pix)
-
- pixtoin() converts a number of pixels to inches (or cm).
-
- ******************************************************************
- minmax(min, max, x, npts)
-
- minmax() is provided for your convenience in determining the ranges of
- your variables.
-
- ******************************************************************
- usertoinch(x_in, y_in, x_inch, y_inch)
-
- usertoinch() takes an x-y pair in your user units and returns the inch
- values in 8192 space. The function works for linear, log, and polar plots.
- For the latter, x is the input radial coordinate, and y is the input
- angular coordinate. The returned coordinates are in x,y space.
-
- ******************************************************************
- usertopix(x_in, y_in, z_in, x_pix, y_pix)
-
- usertopix() takes an x,y pair (2-D plots) or an x,y, z triplet (3-D plots)
- in your user units and returns the pixel values in the 2-D GraphiC pixel
- space. The function works for linear, log, and polar plots. For the
- latter, x is the input radial coordinate, and y is the input angular
- coordinate. The returned coordinates are in x,y space.
-
- ******************************************************************
- settolerance(tolerance)
-
- settolerance() is used to eliminate the error "Too few data points. Try a
- coarser grid." when plotting random point contours or surfaces. Use this
- routine with caution. If you make tolerance big enough you will always
- satisfy the algorithm, but the answers may not be reliable.
-